package com.gxa.eshop.service;

import com.gxa.eshop.dto.OrderDTO;
import com.gxa.eshop.exception.BusinessException;
import com.gxa.eshop.pojo.Order;
import com.gxa.eshop.pojo.OrderStatus;

public interface OrderService {

    /**
     *  创建订单
     * @param orderDTO 订单数据传输对象
     * @return  订单id
     */
    String createOrder(Long userId, OrderDTO orderDTO) throws BusinessException;

    /**
     * 根据id查询订单信息
     * @param id
     * @return
     */
    Order queryOrderById(String id);

    /**
     * 查询订单状态
     * @param id
     * @return
     */
    OrderStatus queryOrderStatus(String id);


    /**
     * 修改订单状态
     * @param orderId
     * @param status
     * @return
     */
    Boolean updateOrderStatus(String orderId,Integer status);


    /**
     * 取消订单
     * @param orderId
     */
    void cancelOrder(String orderId);

}